﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DevExpress.Xpo;
namespace ChuanPlus //modify
{
    public class RejectionDetails : XPLiteObject
    {
        int fRejectionDetailsID;
        [Key(true)]
        public int RejectionDetailsID
        {
            get { return fRejectionDetailsID; }
            set { SetPropertyValue<int>("RejectionDetailsID", ref fRejectionDetailsID, value); }
        }// modify
        Rejection fRejectID;
        [Size(10)]
        [Association("Rejection-RejectionDetails")]
        public Rejection RejectID
        {
            get { return fRejectID; }
            set { SetPropertyValue<Rejection>("RejectID", ref fRejectID, value); }
        }
        Stock fStockID;       
        public Stock StockID
        {
            get { return fStockID; }
            set { SetPropertyValue<Stock>("StockID", ref fStockID, value); }
        }
        //end
        double fQuantity;
        public double Quantity
        {
            get { return fQuantity; }
            set { SetPropertyValue<double>("Quantity", ref fQuantity, value); }
        }
        double fUnitPrice;
        public double UnitPrice
        {
            get { return fUnitPrice; }
            set { SetPropertyValue<double>("UnitPrice", ref fUnitPrice, value); }
        }
        double fVAT;
        public double VAT
        {
            get { return fVAT; }
            set { SetPropertyValue<double>("VAT", ref fVAT, value); }
        }
        public RejectionDetails(Session session) : base(session) { }
        public RejectionDetails() : base(Session.DefaultSession) { }
        public override void AfterConstruction() { base.AfterConstruction(); }
        /// <summary>
        /// Initializes a new instance of the RejectionDetails class.
        /// </summary>
        /// <param name="fStockID"></param>
        /// <param name="fQuantity"></param>
        /// <param name="fUnitPrice"></param>
        /// <param name="fVAT"></param>
        public RejectionDetails(Stock fStockID, double fQuantity, double fUnitPrice, double fVAT)
        {
            this.fStockID = fStockID;
            this.fQuantity = fQuantity;
            this.fUnitPrice = fUnitPrice;
            this.fVAT = fVAT;
        }
    }
}
